package com.itjin.model.domain.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.Max;

/**
 * 新增课程DTO
 */
@Data
@Schema(description = "新增课程请求对象")
public class CourseCreateDTO {

    @Schema(description = "用户ID", required = true)
    @NotNull(message = "用户ID不能为空")
    private Integer userId;

    @Schema(description = "课程名称", required = true)
    @NotBlank(message = "课程名称不能为空")
    private String courseName;

    @Schema(description = "授课教师姓名")
    private String teacherName;

    @Schema(description = "学分", example = "2")
    @Min(value = 1, message = "学分不能小于1")
    @Max(value = 10, message = "学分不能大于10")
    private Integer credit;

    @Schema(description = "课程类型：0-必修课，1-选修课，2-公共课", example = "0")
    @Min(value = 0, message = "课程类型值不正确")
    @Max(value = 2, message = "课程类型值不正确")
    private Integer courseType;

    @Schema(description = "课程描述")
    private String courseDescription;

    @Schema(description = "考核方式：0-考试，1-考查", example = "0")
    @Min(value = 0, message = "考核方式值不正确")
    @Max(value = 1, message = "考核方式值不正确")
    private Integer examType;

    @Schema(description = "上课教室")
    private String classroom;

    @Schema(description = "课程时间段", example = "Monday:08:00-09:40")
    private String classTime;

    @Schema(description = "开始周次", example = "1")
    @Min(value = 1, message = "开始周次不能小于1")
    @Max(value = 30, message = "开始周次不能大于30")
    private Integer weekStart;

    @Schema(description = "结束周次", example = "20")
    @Min(value = 1, message = "结束周次不能小于1")
    @Max(value = 30, message = "结束周次不能大于30")
    private Integer weekEnd;
} 